package com.sellerSystem.vo;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * 主键，订单号，时间，商品信息，收货人，顾客，跟地址表关联的东西，金额，付款方式，订单状态，备注
 *
 */
@Entity
@Table
public class OrderForm implements Serializable{

	// 使用序列自增长作为订单的唯一标识
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer orderId;
	
	//商品数量
	private int orderNumber;
	
	//订购时间
	private String orderTime;

	//一个订单对应一个商品
	private Integer commodityId;
	
	//订单商品的卖家姓名
	private String sellerName;
	
	//每个订单由一位 买家所创建     买家的id
	private Integer customerId;

	//收货人
	private String receiver;
	
	//收货地址
	@Column(length=335)
	private CustomerAddress orderAddress;
	//收货人手机号
	private String receiverTel;
	
	//总价
	private double money;
	
	private int orderStatus;// 订单状态：0：取消过的订单，1：正常完成的订单，2：未付款的订单，3：付款完成但还没有发货的订单
	
	private String evaluation;//订单评价
	
	private String orderTip;// 备注

	

	public String getEvaluation() {
		return evaluation;
	}

	public void setEvaluation(String evaluation) {
		this.evaluation = evaluation;
	}

	public Integer getOrderId() {
		return orderId;
	}

	public void setOrderId(Integer orderId) {
		this.orderId = orderId;
	}

	
	public int getOrderNumber() {
		return orderNumber;
	}

	public void setOrderNumber(int orderNumber) {
		this.orderNumber = orderNumber;
	}

	public String getOrderTime() {
		return orderTime;
	}

	public void setOrderTime(String orderTime) {
		this.orderTime = orderTime;
	}

	
	public Integer getCommodityId() {
		return commodityId;
	}

	public void setCommodityId(Integer commodityId) {
		this.commodityId = commodityId;
	}
	
	public Integer getCustomerId() {
		return customerId;
	}

	public void setCustomerId(Integer customerId) {
		this.customerId = customerId;
	}

	public String getReceiver() {
		return receiver;
	}

	public void setReceiver(String receiver) {
		this.receiver = receiver;
	}

	public CustomerAddress getOrderAddress() {
		return orderAddress;
	}

	public void setOrderAddress(CustomerAddress orderAddress) {
		this.orderAddress = orderAddress;
	}

	



	public double getMoney() {
		return money;
	}

	public void setMoney(double money) {
		this.money = money;
	}

	public int getOrderStatus() {
		return orderStatus;
	}

	public void setOrderStatus(int orderStatus) {
		this.orderStatus = orderStatus;
	}

	public String getOrderTip() {
		return orderTip;
	}

	public void setOrderTip(String orderTip) {
		this.orderTip = orderTip;
	}


	public String getSellerName() {
		return sellerName;
	}

	public void setSellerName(String sellerName) {
		this.sellerName = sellerName;
	}

	public String getReceiverTel() {
		return receiverTel;
	}

	public void setReceiverTel(String receiverTel) {
		this.receiverTel = receiverTel;
	}
	
	
}
